package demo2.factory;

public class Fridge {
    private String brand;  //品牌
    private String type;   //型号
    public  Fridge(){}
    public  Fridge(String brand,String type){
        this.brand=brand;
        this.type=type;
    }

    //冷藏
    public  void coldStorage(){
        System.out.println("冰箱能够对食品进行冷藏保鲜。");
    }

    //冷冻
    public  void freezing(){
        System.out.println("冰箱能够通过冷冻让食品保质期更长。");
    }

    public void info(){
        System.out.println("这是一款型号为"+type+"的"+brand+"冰箱。");
    }
    public String getBrand() {
        return brand;
    }
    public void setBrand(String brand) {
        this.brand = brand;
    }
    public String getType() {
        return type;
    }
    public void setType(String type) {
        this.type = type;
    }

}
